-------------------------------------------------------------------------------
       log:  c:\growth\isqfinal\ot_tbl1.log
  log type:  text
 opened on:   7 Apr 2006, 16:41:34
Analysis do-file c:\growth\isqfinal\ot_tbl1 run on  7 Apr 2006 at 16:41:34

. /*analyses for Oneal and Tir's "Does the Diversionary Use of Force Threaten t
> he
> Democratic Peace," International Studies Quarterly, TAble 1: 4-7-2006*/
. 
. set mem 220m
(225280k)

. 
. use c:\growth\isqfinal\otdirect
(Oneal&Tir ISQ re diversionary theory, directed dyads, w/ Chiozza&Goemans ldr d
> at)

. 
. desc

Contains data from c:\growth\isqfinal\otdirect.dta
  obs:       919,530                          Oneal&Tir ISQ re diversionary
                                                theory, directed dyads, w/
                                                Chiozza&Goemans ldr dat
 vars:            31                          7 Apr 2006 16:41
 size:    68,045,220 (70.5% of memory free)   (_dta has notes)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
state           int    %8.0g                  focal state, COW code
target          int    %8.0g                  potential target state, COW code
year            int    %8.0g                  
democ_st        byte   %8.0g                  state's DEMOC-AUTOC Polity score
democ_tgt       byte   %8.0g                  target's DEMOC-AUTOC Polity
                                                score
depend          float  %9.0g                  state's bilateral trade
                                                w/target/state's GDP
allies          byte   %8.0g                  =1 if allied
lncaprat        float  %9.0g                  ln(state's CINC/target/s CINC
dircont         byte   %9.0g                  =1 if land border
distance        int    %8.0g                  capital-to-capital distance
numstate        int    %8.0g                  number of states in system
finitsda        byte   %9.0g                  =1 if fatal dispute in year
                                                t+1, originator + side A
pyfatA          int    %8.0g                  Time since last finitsda
_spline1        float  %9.0g                  (pyfatA-k1) cubed
_spline2        float  %9.0g                  (pyfatA-k2) cubed
_spline3        float  %9.0g                  (pyfatA-k3) cubed
leadid_st       float  %9.0g                * revised id for leader of state
autoc_st_cg     byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_st_cg     byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_st_cg     byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
leadid_tgt      float  %9.0g                * revised id for leader of target
autoc_tgt_cg    byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_tgt_cg    byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_tgt_cg    byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
rgdp96_st       float  %9.0g                  real 1990$ gdp per capita
grow_st         float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
rgdp96_tgt      float  %9.0g                  real 1990$ gdp per capita
grow_tgt        float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
majpower        byte   %9.0g                  state is COW major power
elect_st        byte   %9.0g                  election in state, year t+1
elect_tg        byte   %9.0g                  election in target, year t+1
                                            * indicated variables have notes
-------------------------------------------------------------------------------
Sorted by:  state  target  year  

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       state |    919530    439.9403    246.4354          2        950
      target |    919530    439.9467    246.4363          2        950
        year |    919530    1973.206    19.23036       1918       1998
    democ_st |    919530   -.3267898       7.534        -10         10
   democ_tgt |    919530   -.3243744    7.534432        -10         10
-------------+--------------------------------------------------------
      depend |    856313    .0022735    .0187338          0   4.297579
      allies |    919530    .0699912    .2551323          0          1
    lncaprat |    919302    .0005342    2.556379  -10.21899   10.21899
     dircont |    919530    .0417974    .2001261          0          1
    distance |    919530     4687.65    2711.032          5      12347
-------------+--------------------------------------------------------
    numstate |    919530    139.3208     39.4261         49        187
    finitsda |    919530    .0003186    .0178477          0          1
      pyfatA |    919530    33.18228    32.87813          0        183
    _spline1 |    919530   -37478.74    73825.37  -504096.5          0
    _spline2 |    919530   -75673.46    162569.1   -1135201          0
-------------+--------------------------------------------------------
    _spline3 |    919530   -104444.7    246805.6   -1790654          0
   leadid_st |    919530    1911.632    878.9031         25       3041
 autoc_st_cg |    919530    .3827205    .4860512          0          1
 mixed_st_cg |    919530      .30302    .4595641          0          1
 democ_st_cg |    919530    .3142595    .4642205          0          1
-------------+--------------------------------------------------------
  leadid_tgt |    919530    1911.656    878.9072         25       3041
autoc_tgt_cg |    919530    .3826085    .4860242          0          1
mixed_tgt_cg |    919530    .3030059     .459558          0          1
democ_tgt_cg |    919530    .3143856     .464271          0          1
   rgdp96_st |    869368    5582.096    6256.156   220.0399   46064.72
-------------+--------------------------------------------------------
     grow_st |    828628    .0162994     .047805  -.2822851   .5209076
  rgdp96_tgt |    869384    5583.028    6256.756   220.0399   46064.72
    grow_tgt |    828644    .0163004    .0478086  -.2822851   .5209076
    majpower |    919530    .0447098    .2066661          0          1
    elect_st |    914247    .0875868    .2826932          0          1
-------------+--------------------------------------------------------
    elect_tg |    882691    .0907373    .2872353          0          1

. 
. /*make minimum value of caprat positive and generate square*/
. replace lncaprat=lncaprat+10.3
(919302 real changes made)

. gen lncapsq=lncaprat^2
(228 missing values generated)

. 
. /*make sure growth not measured across leaders*/
. #del ;
delimiter now ;
. sort state target year;

. quietly by state target: gen grow_stldr=grow_st if (leadid_st==leadid_st[_n-1
> ] &
>       leadid_st==leadid_st[_n-2]);

. quietly by state target: gen grow_tgtldr=grow_tgt if (leadid_tgt==leadid_tgt[
> _n-1] &
>       leadid_tgt==leadid_tgt[_n-2]);

. #del cr
delimiter now cr
. drop grow_st grow_tgt leadid*

. 
. /*identify year before election*/
. by state target: gen el_lag1=elect_st[_n-1] if year-1==year[_n-1]
(37714 missing values generated)

. 
. /*identify year after election*/
. by state target: gen el_lead1=elect_st[_n+1] if year+1==year[_n+1]
(38102 missing values generated)

. 
. gen logdist=ln(distance)

. drop distance

. 
. /*create control for number of states in system for non-rel dyads*/
. gen systsize=-ln(numstate) if ~(dircont==1 | majpower==1)
(75718 missing values generated)

. replace systsize=0 if systsize==.
(75718 real changes made)

. 
. gen dyadid=(1000*state)+target

. drop state*

. 
. drop if depend>1
(63244 observations deleted)

. 
. /*drop exactly zero growth b/c result of interpol of rgdppc*/
. drop if grow_stldr==0
(56342 observations deleted)

. 
. /*all dyads, fatal disputes in year t+1, originator + side A*/
. #del ;
delimiter now ;
. gen demXgrow=grow_stldr if democ_st_cg==1 & democ_st~=.;
(658161 missing values generated)

. replace demXgrow=0 if demXgrow==. & grow_stldr~=.;
(367962 real changes made)

. gen dmtgt_grow=grow_tgtldr if democ_tgt>6 & democ_tgt~=.;
(666232 missing values generated)

. replace dmtgt_grow=0 if dmtgt_grow==. & grow_tgtldr~=.;
(392745 real changes made)

. /*TABLE 1, COLUMN 1*/
> logit finitsda democ_st democ_tgt depend lncaprat lncapsq allies dircont
>       logdist majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     799738
                                                  Wald chi2(14)   =     654.02
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -1526.6865                Pseudo R2       =     0.3476

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    democ_st |  -.0324064   .0144782    -2.24   0.025    -.0607832   -.0040296
   democ_tgt |     .01251   .0147722     0.85   0.397    -.0164429     .041463
      depend |  -17.66393   9.314709    -1.90   0.058    -35.92042    .5925679
    lncaprat |   .7341026   .3563002     2.06   0.039      .035767    1.432438
     lncapsq |  -.0402061   .0172636    -2.33   0.020    -.0740422   -.0063701
      allies |  -.2625069   .2018332    -1.30   0.193    -.6580927    .1330789
     dircont |   1.531766   .4686098     3.27   0.001     .6133074    2.450224
     logdist |  -.3916031   .0995629    -3.93   0.000    -.5867427   -.1964635
    majpower |   .7374878   .3464546     2.13   0.033     .0584492    1.416526
    systsize |   .6433044   .1006714     6.39   0.000     .4459921    .8406167
      pyfatA |   -.402093    .043311    -9.28   0.000    -.4869809   -.3172051
    _spline1 |  -.0018943   .0002825    -6.70   0.000     -.002448   -.0013406
    _spline2 |   .0009235   .0001601     5.77   0.000     .0006097    .0012372
    _spline3 |  -.0000915   .0000284    -3.22   0.001    -.0001472   -.0000358
       _cons |  -4.773031   2.023256    -2.36   0.018    -8.738541   -.8075217
------------------------------------------------------------------------------

note: 64 failures and 0 successes completely determined.

. testparm lncap*;

 ( 1)  lncaprat = 0
 ( 2)  lncapsq = 0

           chi2(  2) =    7.91
         Prob > chi2 =    0.0192


. /*TABLE 1, COLUMN 2*/
> logit finitsda democ_st democ_tgt depend grow_stldr lncaprat lncapsq allies d
> ircont
>       logdist majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     509604
                                                  Wald chi2(15)   =     556.88
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -837.36562                Pseudo R2       =     0.3580

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    democ_st |  -.0305465   .0164344    -1.86   0.063    -.0627573    .0016643
   democ_tgt |   .0135166   .0165709     0.82   0.415    -.0189619     .045995
      depend |   -22.1095   10.98276    -2.01   0.044    -43.63532   -.5836754
  grow_stldr |  -1.213496     1.6658    -0.73   0.466    -4.478405    2.051412
    lncaprat |   .7425072   .4254588     1.75   0.081    -.0913766    1.576391
     lncapsq |  -.0416261   .0202337    -2.06   0.040    -.0812834   -.0019688
      allies |  -.1220893     .22075    -0.55   0.580    -.5547513    .3105727
     dircont |   1.516824   .5196548     2.92   0.004     .4983194    2.535329
     logdist |  -.3080303   .1100464    -2.80   0.005    -.5237172   -.0923433
    majpower |    .648188   .4109403     1.58   0.115    -.1572401    1.453616
    systsize |   .6049764   .1116526     5.42   0.000     .3861412    .8238115
      pyfatA |  -.4989398   .0645425    -7.73   0.000    -.6254408   -.3724387
    _spline1 |  -.0021505   .0003857    -5.58   0.000    -.0029064   -.0013945
    _spline2 |    .000987   .0002112     4.67   0.000      .000573     .001401
    _spline3 |  -.0000687   .0000349    -1.97   0.049    -.0001372   -2.66e-07
       _cons |  -4.519288   2.421503    -1.87   0.062    -9.265346    .2267696
------------------------------------------------------------------------------

note: 95 failures and 0 successes completely determined.

.   testparm lncap*;

 ( 1)  lncaprat = 0
 ( 2)  lncapsq = 0

           chi2(  2) =    8.26
         Prob > chi2 =    0.0161


. /*TABLE 1, COLUMN 3*/
> logit finitsda democ_st democ_tgt depend grow_stldr demXgrow lncaprat lncapsq
>  allies
>       dircont logdist majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     509604
                                                  Wald chi2(16)   =     550.77
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -834.32887                Pseudo R2       =     0.3603

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    democ_st |  -.0213622   .0165322    -1.29   0.196    -.0537648    .0110404
   democ_tgt |   .0130659   .0163576     0.80   0.424    -.0189944    .0451262
      depend |  -21.04792   10.67508    -1.97   0.049     -41.9707   -.1251495
  grow_stldr |  -.0588124   1.654225    -0.04   0.972    -3.301033    3.183409
    demXgrow |   -13.9047   4.118733    -3.38   0.001    -21.97727   -5.832135
    lncaprat |    .743127   .4287932     1.73   0.083    -.0972923    1.583546
     lncapsq |  -.0417209   .0204032    -2.04   0.041    -.0817104   -.0017315
      allies |  -.1300736   .2191495    -0.59   0.553    -.5595987    .2994515
     dircont |   1.484983   .5209128     2.85   0.004     .4640129    2.505953
     logdist |  -.3196558   .1097622    -2.91   0.004    -.5347858   -.1045257
    majpower |   .6638963   .4143441     1.60   0.109    -.1482032    1.475996
    systsize |   .6074978    .111793     5.43   0.000     .3883876    .8266081
      pyfatA |  -.4965996   .0634567    -7.83   0.000    -.6209725   -.3722268
    _spline1 |  -.0021429   .0003803    -5.63   0.000    -.0028883   -.0013975
    _spline2 |   .0009847   .0002087     4.72   0.000     .0005756    .0013938
    _spline3 |  -.0000692   .0000347    -1.99   0.046    -.0001372   -1.08e-06
       _cons |  -4.382705   2.429661    -1.80   0.071    -9.144753    .3793437
------------------------------------------------------------------------------

note: 72 failures and 0 successes completely determined.

.   /*reported in text only re Smith 1996*/
> logit finitsda democ_st democ_tgt depend grow_stldr demXgrow dmtgt_grow lncap
> rat
>       lncapsq allies dircont logdist majpower systsize pyfatA _spl*, nolog
>       cluster(dyadid);

Logit estimates                                   Number of obs   =     363173
                                                  Wald chi2(17)   =     357.36
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -495.26398                Pseudo R2       =     0.3572

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    democ_st |  -.0102107   .0212949    -0.48   0.632    -.0519479    .0315264
   democ_tgt |    .008171   .0213626     0.38   0.702    -.0336988    .0500409
      depend |  -11.61075   8.352926    -1.39   0.165    -27.98219    4.760683
  grow_stldr |  -2.114873   2.315779    -0.91   0.361    -6.653716     2.42397
    demXgrow |  -17.37812   4.834531    -3.59   0.000    -26.85363   -7.902611
  dmtgt_grow |   7.195838    7.04836     1.02   0.307    -6.618694    21.01037
    lncaprat |   .8269613   .5586948     1.48   0.139    -.2680604    1.921983
     lncapsq |  -.0439585   .0266845    -1.65   0.099    -.0962591    .0083421
      allies |  -.2946676   .2464772    -1.20   0.232     -.777754    .1884189
     dircont |   2.236347   .9591998     2.33   0.020     .3563504    4.116345
     logdist |   -.488552    .133206    -3.67   0.000     -.749631    -.227473
    majpower |   .4370079   .4931038     0.89   0.375    -.5294578    1.403474
    systsize |   .4204074   .2022564     2.08   0.038     .0239922    .8168226
      pyfatA |  -.4520058   .0855599    -5.28   0.000    -.6197001   -.2843115
    _spline1 |  -.0019435   .0005182    -3.75   0.000    -.0029592   -.0009278
    _spline2 |    .000894   .0002835     3.15   0.002     .0003384    .0014497
    _spline3 |  -.0000629   .0000462    -1.36   0.173    -.0001534    .0000276
       _cons |   -5.00645   3.096896    -1.62   0.106    -11.07625    1.063355
------------------------------------------------------------------------------

note: 4 failures and 0 successes completely determined.

.   /*TABLE 1, COLUMN 4*/
> logit finitsda el_lag1 elect_st el_lead1 democ_st democ_tgt depend 
>       demXgrow lncaprat lncapsq allies dircont logdist majpower systsize pyfa
> tA
>       _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     489148
                                                  Wald chi2(18)   =     355.87
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -458.31684                Pseudo R2       =     0.2797

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     el_lag1 |  -.8626983   1.044937    -0.83   0.409    -2.910737     1.18534
    elect_st |  -.2942952   .7951449    -0.37   0.711    -1.852751     1.26416
    el_lead1 |   .2209588   .6640551     0.33   0.739    -1.080565    1.522483
    democ_st |  -.0192777   .0278867    -0.69   0.489    -.0739347    .0353793
   democ_tgt |   .0199166   .0219364     0.91   0.364     -.023078    .0629111
      depend |   -13.6344   7.571154    -1.80   0.072    -28.47359    1.204791
    demXgrow |  -19.95854   6.267819    -3.18   0.001    -32.24324   -7.673843
    lncaprat |   .4309195   .4323717     1.00   0.319    -.4165134    1.278352
     lncapsq |  -.0274373   .0229517    -1.20   0.232    -.0724219    .0175472
      allies |  -.2117015   .3181566    -0.67   0.506    -.8352769     .411874
     dircont |    1.37283    .879926     1.56   0.119    -.3517929    3.097454
     logdist |  -.2307476   .1446578    -1.60   0.111    -.5142716    .0527765
    majpower |   .1801265   .8299725     0.22   0.828     -1.44659    1.806843
    systsize |   .6613482   .1739385     3.80   0.000      .320435    1.002261
      pyfatA |  -.4182961   .1072945    -3.90   0.000    -.6285895   -.2080027
    _spline1 |  -.0018866   .0006115    -3.09   0.002    -.0030851   -.0006882
    _spline2 |   .0008917   .0003269     2.73   0.006      .000251    .0015324
    _spline3 |   -.000075   .0000499    -1.50   0.133    -.0001728    .0000228
       _cons |  -4.284499   2.812319    -1.52   0.128    -9.796542    1.227544
------------------------------------------------------------------------------

note: 15 failures and 0 successes completely determined.

.  exit;

end of do-file
       log:  c:\growth\isqfinal\ot_tbl1.log
  log type:  text
 closed on:   7 Apr 2006, 16:43:03
-------------------------------------------------------------------------------
